// ObjectExample.js
var http = require('http');

// 如果是自定义的 JS 文件，一定要加上相对地址的"./"或"../"
var User = require('./module/User');
var Student = require('./module/Student.js');

var server = http.createServer(function(req, resp){
    if(req.url != '/favicon.ico'){
        var user = new User('wxg', 32);
        resp.write( user.say() );
        resp.write( '\r\n' );
        var stu = new Student('Jack', 32);
        resp.write( stu.say() );
        resp.write( '\r\n' );
        resp.write( stu.study() );
        resp.end('\r\nhello,world!');
    }
});

server.listen(3000, '127.0.0.1');
